/**
 * 
 */
package com.zuipin.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.RuleSetUseLog;
import com.zuipin.mapper.RuleSetUseLogMapper;
import com.zuipin.service.IRuleSetUseLogService;
import com.zuipin.util.ConstantsUtil;
import com.zuipin.util.DateUtils;

/** 
 * @ClassName: IRuleSetUseLogServiceImpl 
 * @author wuyicheng
 * @time 2017年7月17日上午9:09:32 
 */
@Service
public class RuleSetUseLogServiceImpl implements IRuleSetUseLogService {
	@Resource
	private RuleSetUseLogMapper ruleSetUseLogMapper;
	
	/** 
	 *
	 * @Title: findById 
	 * @author: wuyicheng
	 * @date: 2017年7月17日上午9:11:33 
	 * @return
	 * @throws 
	 */
	@Override
	public RuleSetUseLog findById(Long id) {
		return ruleSetUseLogMapper.findById(id);
	}
	
	/** 
	 *
	 * @Title: insert 
	 * @author: wuyicheng
	 * @date: 2017年7月17日上午9:11:33 
	 * @param ruleSetUseLog
	 * @throws 
	 */
	@Override
	public void insert(RuleSetUseLog ruleSetUseLog) {
		ruleSetUseLog.setCreateTime(DateUtils.getCurrentDateTime());
		ruleSetUseLog.setUpdateTime(DateUtils.getCurrentDateTime());
		ruleSetUseLog.setDelFlag(ConstantsUtil.DEL_FLAG_NO_0);
		ruleSetUseLogMapper.insert(ruleSetUseLog);
	}
	
	/** 
	 *
	 * @Title: update 
	 * @author: wuyicheng
	 * @date: 2017年7月17日上午9:11:33 
	 * @param ruleSetUseLog
	 * @throws 
	 */
	@Override
	public void update(RuleSetUseLog ruleSetUseLog) {
		ruleSetUseLog.setUpdateTime(DateUtils.getCurrentDateTime());
		ruleSetUseLogMapper.insert(ruleSetUseLog);
	}
	
}
